<template>
    <div class="number-card">
      <div :class="{card: item !== ','}" v-for="(item, i) in arr" :key="i">
        {{ item }}
      </div>
    </div>
</template>
<script setup lang="ts">
import { computed } from 'vue';
import { formatNumber } from '../hooks/useRecentWin';


const props = defineProps({
  number: {
    type: [Number, String],
    default: ''
  }
})

const arr = computed(() => {
  return [...formatNumber(props.number)]
})

</script>
<style lang="scss" scoped>
.number-card {
  display: flex;
  align-items: center;
  margin: 0 auto;
  justify-content: center;
  margin-top: 4px;
  >div {
    text-align: center;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    margin-right: 3px;
    color: #fff;

    &.card {
      width: 24px;
      height: 24px;
      border-radius: 2px;
      background: #FFF;
      color: #FF7B37;
    }
  }
}
</style>